package db

const TableNameProduction = TablePrefix + "production"

type Production struct {
	BaseModel
	Name          string `gorm:"column:name;type:varchar(100);default:'';comment:名称" json:"name" form:"name"`                            // 名称
	ConsumeTypeID uint   `gorm:"column:consume_type_id;type:int(11);default:0;comment:消耗类型id" json:"consumeTypeID" form:"consumeTypeID"` // 消耗类型id
	ConsumeNum    int64  `gorm:"column:consume_num;type:int(11);default:0;comment:消耗数量" json:"consumeNum" form:"consumeNum"`             //消耗数量
}

func (*Production) TableName() string {
	return TableNameProduction
}

type ProductionHaxOneType struct {
	Production
	Types Type `gorm:"foreignKey:ID;references:ConsumeTypeID" json:"types"`
}
